import Vue from 'vue';
import App from './App.vue';
import Vant from 'vant';
import VueRouter from 'vue-router';
import router from '@/router';
import moment from 'moment';
import Vuex from 'vuex';
import storeConfig from '@/store';
import 'vant/lib/index.css';
import '@/assets/styles/main.less';
// import { hljs } from 'highlight/lib/vendor/highlight.js/highlight';

// 全局组件
import NavBar from '@/components/nav-bar';
import ArticleList from '@/components/article-list';

Vue.component('NavBar', NavBar);
Vue.component('ArticleList', ArticleList);

Vue.use(Vuex);

// 全局设置moment语言
moment.locale('zh-cn');

// 路由
Vue.use(VueRouter);
// 全局注册Vant组件
Vue.use(Vant);

Vue.config.productionTip = false;

new Vue({
  // 挂载路由
  router,
  // 挂载store
  store: new Vuex.Store(storeConfig),
  render: (h) => h(App),
}).$mount('#app');
